<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>订单 </title>
		<meta http-equiv="expires" content="0">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<link rel="stylesheet" href="../../../css/reset.css" />
		<link rel="stylesheet" href="../../../css/mui.min.css" />
		<link rel="stylesheet" href="../../../css/iconfont.css" />
		<link rel="stylesheet" href="../../../css/cmms.css" />
		<link rel="stylesheet" href="../../../css/doctor/order.css" />
		<link rel="stylesheet" href="../../../css/sale/payment/order.css"/>
		<script src="../../../js/vconsole.min.js"></script>
	</head>
	<body>
		<div class="mui-content" id="order" v-cloak>
			<div class="wrap">
				<section class="panel order-panel" v-for="orders in orderList">
					<div class="overflow order-title">
						<span>{{orders.doctorName}}</span>
						<span>{{orders.payTime|replaceT}}</span>
						<span class="right"><i class="iconfont icon-shijian-"></i>{{orders.orderState+""|formatState}}</span>
					</div>
					<div class="check-server-code"><p>检验条形码：</p><p><span v-for="codeList in orders.specimenBarCode">{{codeList}}</span></p></div>
					<div class="check-item"><span v-for="name in orders.names">{{name}}</span></div>
					<div class="overflow check-item">
						<span>共<span class="basic-color">{{orders.projectNum}}</span>个检验项目<span class="basic-color"> ¥{{orders.amount}}</span></span>
						<span class="right"><i class="iconfont icon-icon1 basic-color"></i>{{orders.patientName}}</span>
					</div>
					<div class="overflow get-report">
						<span>预计{{orders.reportTime}}个工作日</span>
						<span class="btn-detail right" @tap="orderDetail(orders.orderId)">订单详情</span>
					</div>
				</section>
				<div class="noData" v-show="!orderList.length>0">
					<p><img src="../../../img/nodata.png"/></p>
					<p>暂无内容</p>
				</div>
			</div>
		</div>
		<script src="../../../js/mui.min.js"></script>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../../../js/vue.js"></script>
		<script src="../../../js/cmms.js?time=333"></script>
		<script>
			new Vue({
				el:"#order",
				data:{
					id:'',
					orderList:[]
				},
				mounted(){
//					var vConsole = new VConsole();
					this.loadInfo();
				},
				methods:{
					loadInfo(){
						let _this = this;
						_this.id = location.search.split('=')[1].split('&')[0];
						console.log(_this.id);
						AT.muiAjax('/clinic-doctor/order/getOrderByOrderPayId','post',{
							id:_this.id
						},
						function(res){
							console.log(res);
							_this.orderList = res;
						});
					},
					orderDetail(orderId){
						console.log(orderId);
						location.href = "./../orderDetail.html?id="+orderId;
					}
				}
			})
		</script>
	</body>
</html>

